package net.sppan.base.common;

public enum RepairStatusEnum {

    NO_READ(0,"待维修"),
    READING(1,"维修中"),
    READED(2,"已维修")

    ;

    private Integer code;

    private String value;

    RepairStatusEnum(Integer code, String value) {
        this.code = code;
        this.value = value;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public static  String getValueByCode(Integer code){
        for(RepairStatusEnum repairStatusEnum : RepairStatusEnum.values()){
            if(repairStatusEnum.getCode() == code){
                return repairStatusEnum.getValue();
            }
        }

        return "";
    }
}
